﻿using Common.Model;
using Common.Orm;
using PetaPoco;

namespace Common.Service
{
    /// <summary>
    ///Cd_User业务层
    /// </summary>
    public class Cd_UserService : Repository<Cd_User>
    {
        public Cd_User Login(string username, string password)
        {
            Sql sql = Condition.Builder.Equal("UserName", username).Equal("UserPassword", password).Create();
            var result = GetList(sql, null);
            if (result.Count > 0)
                return result[0];
            return null;
        }
    }
}